﻿using System;
using UnityEngine;
using UnityEngine.UI;

namespace Jacky
{
    /// <summary>
    /// 管理node的UI事件
    /// </summary>
    public class NodeEvent
    {
        public Action ClickEvent;

        public Action LongPressEvent;

        public void InitEvent(GameObject go)
        {
            var button = go.GetComponent<Button>();
            button.onClick.AddListener(OnClick);
        }

        private void OnClick()
        {
            
        }

        private void OnLongPress()
        {
            
        }

        public void Dispose()
        {
            ClickEvent = null;
            LongPressEvent = null;
        }
    }
}